package de.tuhh.simsearch.dto;

import java.io.Serializable;

/**
 * The PasswordDTO is the data transfer object for passwords. The password dto is transmitted seperatly so that user and
 * password can not be associated easily. It is used to transmit changed passwords, so old password and the new password
 * entered two times.
 * 
 * @author SimSearch 1
 * 
 */
public class PasswordDTO implements Serializable {

  private static final long serialVersionUID = 3416590620683922790L;

  private String oldPassword;
  private String newPassword;
  private String repeatNewPassword;

  /**
   * Default class constructor
   */
  public PasswordDTO() {

  }

  /**
   * The class constructor, sets old password, new password and the repeated new password
   * 
   * @param oldPw
   *          the old password
   * @param newPw
   *          the new password
   * @param repeatNewPw
   *          the new password repeated
   */
  public PasswordDTO(String oldPw, String newPw, String repeatNewPw) {

    this.oldPassword = oldPw;
    this.newPassword = newPw;
    this.repeatNewPassword = repeatNewPw;
  }

  /**
   * Gets the old password
   * 
   * @return the old password
   */
  public String getOldPassword() {

    return oldPassword;
  }

  /**
   * Sets the old password
   * 
   * @param oldPassword
   *          the old password
   */
  public void setOldPassword(String oldPassword) {

    this.oldPassword = oldPassword;
  }

  /**
   * Gets the new password
   * 
   * @return the new password
   */
  public String getNewPassword() {

    return newPassword;
  }

  /**
   * Sets the new password
   * 
   * @param newPassword
   *          the new password
   */
  public void setNewPassword(String newPassword) {

    this.newPassword = newPassword;
  }

  /**
   * Gets the repeated password
   * 
   * @return the repeated password
   */
  public String getRepeatNewPassword() {

    return repeatNewPassword;
  }

  /**
   * Sets the repeated password
   * 
   * @param repeatNewPassword
   *          the repeated password to set
   */
  public void setRepeatNewPassword(String repeatNewPassword) {

    this.repeatNewPassword = repeatNewPassword;
  }

}
